<?php
/**
 * Represents a EmbraceTable from EmbraceModel.
 * 
 * @author s.marletta
 * @version $Id: EmbraceTable.php 6 2009-04-28 20:11:07Z embrace.toolkit $
 */
class EmbraceTable {
	/**
	 * The table name.
	 * @var String
	 */
	private $tableName;
	
	/**
	 * name of the primary key.
	 * @var String
	 */
	private $primaryKey;
	
	/**
	 * Creates a embrace table object.
	 * 
	 * @param $tableName name of the table
	 * @param $primaryKey name of the primary key 
	 */
	public function EmbraceTable($tableName, $primaryKey) {
		if(empty($tableName))
			throw new Exception("No table name given.");
			
		if(empty($primaryKey))
			throw new Exception("No primary key given");
			
		$this->tableName = $tableName;
		$this->primaryKey = $primaryKey;
	}
	
	/**
	 * Returns the table name.
	 * @return String
	 */
	public function getTableName() {
		return $this->tableName;
	}
	
	/**
	 * Returns the tables primary key name.
	 * @return String
	 */
	public function getPrimaryKey() {
		return $this->primaryKey;
	}
}
?>